-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
CC1101 docs #5614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: next
Are you sure you want to change the base?
CC1101 docs #5614
Conversation
✅ Deploy Preview for esphome ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍 |
| pin: GPIOXX # CC1101 GDO0 | ||
| dump: all | ||
| ``` | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need modify the pin config that will fail validation and not work, see: https://esphome.io/components/sx127x/#as-a-transmitter--receiver
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can copy the example from my docs. Claude is really good at it too and can do it in a few seconds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think fixed it correctly in the latest commit?
| output: true | ||
| pullup: true | ||
| open_drain: true | ||
| allow_other_uses: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still missing this in remote transmitter:
eot_level: false
on_transmit:
then:
- sx127x.set_mode_standby
- remote_transmitter.digital_write: false
- sx127x.set_mode_tx
on_complete:
then:
- sx127x.set_mode_standby
- remote_transmitter.digital_write: true
- sx127x.set_mode_rx
| - cc1101.begin_tx: | ||
| on_complete: | ||
| then: | ||
| - cc1101.end_tx: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You really need to do the same thing as the sx127x when using the same pin:
eot_level: false
on_transmit:
then:
- sx127x.set_mode_standby
- remote_transmitter.digital_write: false
- sx127x.set_mode_tx
on_complete:
then:
- sx127x.set_mode_standby
- remote_transmitter.digital_write: true
- sx127x.set_mode_rx
Since the pin is configured as open drain it needs special handling. With open drain it is actively driven low by the chip but passively pulled up by the pull up. In rx the transmitter needs to be set the pin to high. By setting it to high the chip no longer drives the pin and the receiver is able to drive it (only the pullup is connected). Before switching to transmit its best to set the radio to idle, then drive the pin low and only then switch to tx. This avoids transmitting 'on' before remote transmitter starts. When switching to rx it is the same thing in reverse.
What you have won't work without the remote_transmitter.digital_write calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to double check the code because i thought that was still in there by default, but I must have removed the Idle state on transistions from RX>TX and vice versa. I'll get it corrected tomorrow and add an idle state in.
Do you prefer it to be setup like your example or can i just wrap all the code inside of the begin_tx and end_tx to make it simpler on the user config side?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, dont try to call remote transmitter from inside cc1101
Description:
Adding docs for CC1101 component
Related issue (if applicable): fixes
Pull request in esphome with YAML changes (if applicable):
Checklist:
I am merging into
nextbecause this is new documentation that has a matching pull-request in esphome as linked above.or
I am merging into
currentbecause this is a fix, change and/or adjustment in the current documentation and is not for a new component or feature.Link added in
/components/index.rstwhen creating new documents for new components or cookbook.New Component Images
If you are adding a new component to ESPHome, you can automatically generate a standardized black and white component name image for the documentation.
To generate a component image:
Comment on this pull request with the following command, replacing
COMPONENT_NAMEwith your component name in UPPER_CASE format with underscores (e.g.,BME280,SHT3X,DALLAS_TEMP):The ESPHome bot will respond with a downloadable ZIP file containing the SVG image.
Extract the SVG file and place it in the
images/folder of this repository.Use the image in your component's index table entry in
/components/index.rst.Example: For a component called "DHT22 Temperature Sensor", use: